package closure;

public class ClosureDemo {

    public static void main(String[] args) {
        ClosureDemo closureDemo = new ClosureDemo();
        closureDemo.add().run();
    }

    public Runnable add(){
       final int x = 0;
        return new Runnable() {
            public void run() {
                System.out.println(x);
            }
        };
    }

}
